﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace di4ti
{
     public class enemy
    {
        int _level;
        string _name;
        int _xueliang ;
        //父类属性
        public int level{ set; get; }
        public string Name { set; get; }
        public string xueliang { set; get; }
        //有参构造函数
        public enemy (string n)
        {
            Name = n;
            Console.WriteLine("【姓名为：】" + Name + "");
        }
        //普通方法
        public void hanjiao ()
        {
            Console.WriteLine("此路是我开，哪里走！");
        }
        //虚方法
        public virtual void attack()
        {
            Console.WriteLine("我发起了普通攻击");
        }





    }
}
